﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using AltimilliaLibrary.ScreenManagement;
using Microsoft.Xna.Framework.Graphics;

namespace AltimilliaLibrary
{
    public class Engine : DrawableGameComponent 
    {
        public ScreenManager ScreenManager { get; set; }
        public SpriteBatch batch { get; set; }

        public Engine(Game game)
            : base(game)
        {
            ScreenManager = new ScreenManager(this);
            ScreenManager.AddObject(new WorldScreen());
            batch = new SpriteBatch(game.GraphicsDevice);
            game.Components.Add(this);
        }
        public override void Initialize()
        {
            ScreenManager.Initialize();
            base.Initialize();
        }
        public override void Update(GameTime gameTime)
        {
            ScreenManager.Update(gameTime);
            base.Update(gameTime);
        }
        public override void Draw(GameTime gameTime)
        {
            ScreenManager.Draw(gameTime);
            base.Draw(gameTime);
        }
    }
}
